package com.training1.core.modules.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.training1.core.common.service.CrudService;
import com.training1.core.entity.ChargeEntity;
import com.training1.core.entity.NodeAccountEntity;
import com.training1.core.modules.dao.APIAccountIncomeDao;
import com.training1.core.modules.dao.ChargeDao;

@Service
@Transactional
public class APIAccountIncomeService extends CrudService<ChargeDao,ChargeEntity>{
	
	@Resource
	private APIAccountIncomeDao aaiDao;
	/*
	 * 获得该会员总收入
	 */
	public String getTotalIncome(String cellphone){
		return aaiDao.getTotalIncome(cellphone);
	}
	/*
	 * 获得该会员总推荐奖
	 */
	public String getRecommendSum(String cellphone){
		return aaiDao.getRecommendSum(cellphone);
	}
	/*
	 * 获得总推荐奖不为0的被推荐人列表
	 */
	public List<NodeAccountEntity> getRecommendedList(Map<String,Object> map){
		return aaiDao.getRecommendedList(map);
	}
	
}